<!--
 * @Author: zk
 * @Date: 2021-01-20 17:23:21
 * @LastEditors: zk
 * @LastEditTime: 2021-01-22 10:48:25
 * @Description:
-->
<template>
  <div class="age-date">

    <el-select
      v-model="model.ageDate"
      class="select"
      placeholder="请选择..."
      :style="{ width: '6rem' }"
      @change="SelectValue($event)"
    >
      <el-option
        v-for="op in options"
        :key="op.value"
        :label="op.label"
        :value="op.value"
      />
    </el-select>
    <el-input style="width:50px;margin-right: 10px;" />
    <el-input style="width:50px" />

  </div>
</template>

<script>
export default {
  name: 'MyInformation',
  props: {
    model: {
      type: Object,
      default: () => {}
    },
    itemOptions: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      value1: '',
      keyValueD: true,
      options: [
        { label: '按年', value: 0 },
        { label: '按月', value: 1 }
      ]
    }
  },
  methods: {
    SelectValue(val) {
      if (val) {
        this.keyValueD = false
      } else {
        this.keyValueD = true
      }
      this.model.ageDate = val
    }
  }
}
</script>

<style lang="scss" scoped>
.age-date{
  margin-right: 10px;
  display: flex;
  .select{
    margin-right: 10px;
  }
  .data-picker{
    flex: 1;
    width: 10px;
  }
}

</style>
